package com.noqueue.service.impl;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

class GenericDAO<T> {
	private Class<T> entityClass;

	protected GenericDAO() {
		Type type = getClass().getGenericSuperclass();
		Type trueType = ((ParameterizedType) type).getActualTypeArguments()[0];
		this.entityClass = (Class<T>) trueType;
		System.out.println(this.entityClass.getSimpleName());
	}
}

class OptionManager extends GenericDAO<TestObject> {

}

public class OracleTest {
	public static void main(String[] args) throws Exception {
		OptionManager manager = new OptionManager();
	}
}

class TestObject {

}
